Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to gadgets on IPv6-enabled host is failing #876

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lelutin
Copy link
Contributor

@lelutin lelutin commented Aug 18, 2024

On hosts where IPv6 is enabled and preferred by the system, gadgets might be listening to ::1 instead of 127.0.0.1. In those situations, vimspector times out, unable to connect to the gadget even though they've both agreed about which port to use.

Changing the default host value to 'localhost' makes it possible for IPv6-enabled hosts to use the same default in vimspector than in the gadgets.

On hosts where IPv6 is enabled and preferred by the system, gadgets
might be listening to ::1 instead of 127.0.0.1. In those situations,
vimspector times out, unable to connect to the gadget even though
they've both agreed about which port to use.

Changing the default host value to 'localhost' makes it possible for
IPv6-enabled hosts to use the same default in vimspector than in the
gadgets.
@puremourning
Copy link
Owner

This change is Reviewable

@puremourning
Copy link
Owner

Thanks for the PR, but unfortunately, we force the use of IPv4 for the exact opposite reason! See 4206d0e for example.

There were a swathe of issues when using localhost because for some unspeakable reason certain OS distributions default to using IPv6 and so just hang when using localhost, and most servers are using IPv4 for this comms.

I think if your server uses IPv6 by default, you just need to set host to ::1 when connecting.

@lelutin
Copy link
Contributor Author

lelutin commented Aug 18, 2024

Oh I see, thanks for the details. It's a bit unfortunate to still be defaulting to ipv4 nowadays but I can understand that ipv6 has still not established its hegemony and so ipv4 keeps on being the safe default.

So instead of this MR, maybe we could add a quick mention of the default value (and thus address family) for host somewhere?
The most relevant place I could find was in https://puremourning.github.io/vimspector/configuration.html#debug-adapter-configuration but we could also drop a note in https://github.com/puremourning/vimspector/wiki/Additional-Language-Support#gadget-installer-files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants